/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("./protobuf.js");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.JhaoProto = (function() {

    /**
     * Namespace JhaoProto.
     * @exports JhaoProto
     * @namespace
     */
    var JhaoProto = {};

    JhaoProto.BaseMsg = (function() {

        /**
         * Properties of a BaseMsg.
         * @memberof JhaoProto
         * @interface IBaseMsg
         * @property {number|null} [cmdOrder] BaseMsg cmdOrder
         * @property {number|null} [cmdIndex] BaseMsg cmdIndex
         * @property {number|Long|null} [timeUpload] BaseMsg timeUpload
         * @property {number|Long|null} [timeDownload] BaseMsg timeDownload
         * @property {JhaoProto.ErrorCodeWs|null} [errorCode] BaseMsg errorCode
         * @property {string|null} [errorMsg] BaseMsg errorMsg
         * @property {Uint8Array|null} [data] BaseMsg data
         */

        /**
         * Constructs a new BaseMsg.
         * @memberof JhaoProto
         * @classdesc 传输到服务器的公共数据
         * cmd_order = 命令序列号
         * cmd_index = 命令编号
         * time_upload = 上行时间戳(毫秒)
         * time_download = 下行时间戳(毫秒)
         * data = 业务逻辑data
         * @implements IBaseMsg
         * @constructor
         * @param {JhaoProto.IBaseMsg=} [properties] Properties to set
         */
        function BaseMsg(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * BaseMsg cmdOrder.
         * @member {number} cmdOrder
         * @memberof JhaoProto.BaseMsg
         * @instance
         */
        BaseMsg.prototype.cmdOrder = 0;

        /**
         * BaseMsg cmdIndex.
         * @member {number} cmdIndex
         * @memberof JhaoProto.BaseMsg
         * @instance
         */
        BaseMsg.prototype.cmdIndex = 0;

        /**
         * BaseMsg timeUpload.
         * @member {number|Long} timeUpload
         * @memberof JhaoProto.BaseMsg
         * @instance
         */
        BaseMsg.prototype.timeUpload = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * BaseMsg timeDownload.
         * @member {number|Long} timeDownload
         * @memberof JhaoProto.BaseMsg
         * @instance
         */
        BaseMsg.prototype.timeDownload = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * BaseMsg errorCode.
         * @member {JhaoProto.ErrorCodeWs} errorCode
         * @memberof JhaoProto.BaseMsg
         * @instance
         */
        BaseMsg.prototype.errorCode = 0;

        /**
         * BaseMsg errorMsg.
         * @member {string} errorMsg
         * @memberof JhaoProto.BaseMsg
         * @instance
         */
        BaseMsg.prototype.errorMsg = "";

        /**
         * BaseMsg data.
         * @member {Uint8Array} data
         * @memberof JhaoProto.BaseMsg
         * @instance
         */
        BaseMsg.prototype.data = $util.newBuffer([]);

        /**
         * Creates a new BaseMsg instance using the specified properties.
         * @function create
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {JhaoProto.IBaseMsg=} [properties] Properties to set
         * @returns {JhaoProto.BaseMsg} BaseMsg instance
         */
        BaseMsg.create = function create(properties) {
            return new BaseMsg(properties);
        };

        /**
         * Encodes the specified BaseMsg message. Does not implicitly {@link JhaoProto.BaseMsg.verify|verify} messages.
         * @function encode
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {JhaoProto.IBaseMsg} message BaseMsg message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BaseMsg.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.cmdOrder != null && Object.hasOwnProperty.call(message, "cmdOrder"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cmdOrder);
            if (message.cmdIndex != null && Object.hasOwnProperty.call(message, "cmdIndex"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cmdIndex);
            if (message.timeUpload != null && Object.hasOwnProperty.call(message, "timeUpload"))
                writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timeUpload);
            if (message.timeDownload != null && Object.hasOwnProperty.call(message, "timeDownload"))
                writer.uint32(/* id 4, wireType 0 =*/32).int64(message.timeDownload);
            if (message.errorCode != null && Object.hasOwnProperty.call(message, "errorCode"))
                writer.uint32(/* id 5, wireType 0 =*/40).int32(message.errorCode);
            if (message.errorMsg != null && Object.hasOwnProperty.call(message, "errorMsg"))
                writer.uint32(/* id 6, wireType 2 =*/50).string(message.errorMsg);
            if (message.data != null && Object.hasOwnProperty.call(message, "data"))
                writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.data);
            return writer;
        };

        /**
         * Encodes the specified BaseMsg message, length delimited. Does not implicitly {@link JhaoProto.BaseMsg.verify|verify} messages.
         * @function encodeDelimited
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {JhaoProto.IBaseMsg} message BaseMsg message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        BaseMsg.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a BaseMsg message from the specified reader or buffer.
         * @function decode
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {JhaoProto.BaseMsg} BaseMsg
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BaseMsg.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.JhaoProto.BaseMsg();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.cmdOrder = reader.int32();
                        break;
                    }
                case 2: {
                        message.cmdIndex = reader.int32();
                        break;
                    }
                case 3: {
                        message.timeUpload = reader.int64();
                        break;
                    }
                case 4: {
                        message.timeDownload = reader.int64();
                        break;
                    }
                case 5: {
                        message.errorCode = reader.int32();
                        break;
                    }
                case 6: {
                        message.errorMsg = reader.string();
                        break;
                    }
                case 7: {
                        message.data = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a BaseMsg message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {JhaoProto.BaseMsg} BaseMsg
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        BaseMsg.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a BaseMsg message.
         * @function verify
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        BaseMsg.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.cmdOrder != null && message.hasOwnProperty("cmdOrder"))
                if (!$util.isInteger(message.cmdOrder))
                    return "cmdOrder: integer expected";
            if (message.cmdIndex != null && message.hasOwnProperty("cmdIndex"))
                if (!$util.isInteger(message.cmdIndex))
                    return "cmdIndex: integer expected";
            if (message.timeUpload != null && message.hasOwnProperty("timeUpload"))
                if (!$util.isInteger(message.timeUpload) && !(message.timeUpload && $util.isInteger(message.timeUpload.low) && $util.isInteger(message.timeUpload.high)))
                    return "timeUpload: integer|Long expected";
            if (message.timeDownload != null && message.hasOwnProperty("timeDownload"))
                if (!$util.isInteger(message.timeDownload) && !(message.timeDownload && $util.isInteger(message.timeDownload.low) && $util.isInteger(message.timeDownload.high)))
                    return "timeDownload: integer|Long expected";
            if (message.errorCode != null && message.hasOwnProperty("errorCode"))
                switch (message.errorCode) {
                default:
                    return "errorCode: enum value expected";
                case 0:
                case 200:
                    break;
                }
            if (message.errorMsg != null && message.hasOwnProperty("errorMsg"))
                if (!$util.isString(message.errorMsg))
                    return "errorMsg: string expected";
            if (message.data != null && message.hasOwnProperty("data"))
                if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
                    return "data: buffer expected";
            return null;
        };

        /**
         * Creates a BaseMsg message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {JhaoProto.BaseMsg} BaseMsg
         */
        BaseMsg.fromObject = function fromObject(object) {
            if (object instanceof $root.JhaoProto.BaseMsg)
                return object;
            var message = new $root.JhaoProto.BaseMsg();
            if (object.cmdOrder != null)
                message.cmdOrder = object.cmdOrder | 0;
            if (object.cmdIndex != null)
                message.cmdIndex = object.cmdIndex | 0;
            if (object.timeUpload != null)
                if ($util.Long)
                    (message.timeUpload = $util.Long.fromValue(object.timeUpload)).unsigned = false;
                else if (typeof object.timeUpload === "string")
                    message.timeUpload = parseInt(object.timeUpload, 10);
                else if (typeof object.timeUpload === "number")
                    message.timeUpload = object.timeUpload;
                else if (typeof object.timeUpload === "object")
                    message.timeUpload = new $util.LongBits(object.timeUpload.low >>> 0, object.timeUpload.high >>> 0).toNumber();
            if (object.timeDownload != null)
                if ($util.Long)
                    (message.timeDownload = $util.Long.fromValue(object.timeDownload)).unsigned = false;
                else if (typeof object.timeDownload === "string")
                    message.timeDownload = parseInt(object.timeDownload, 10);
                else if (typeof object.timeDownload === "number")
                    message.timeDownload = object.timeDownload;
                else if (typeof object.timeDownload === "object")
                    message.timeDownload = new $util.LongBits(object.timeDownload.low >>> 0, object.timeDownload.high >>> 0).toNumber();
            switch (object.errorCode) {
            default:
                if (typeof object.errorCode === "number") {
                    message.errorCode = object.errorCode;
                    break;
                }
                break;
            case "None_ERRORCODEWS":
            case 0:
                message.errorCode = 0;
                break;
            case "OK":
            case 200:
                message.errorCode = 200;
                break;
            }
            if (object.errorMsg != null)
                message.errorMsg = String(object.errorMsg);
            if (object.data != null)
                if (typeof object.data === "string")
                    $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
                else if (object.data.length >= 0)
                    message.data = object.data;
            return message;
        };

        /**
         * Creates a plain object from a BaseMsg message. Also converts values to other types if specified.
         * @function toObject
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {JhaoProto.BaseMsg} message BaseMsg
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        BaseMsg.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.cmdOrder = 0;
                object.cmdIndex = 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.timeUpload = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timeUpload = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.timeDownload = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.timeDownload = options.longs === String ? "0" : 0;
                object.errorCode = options.enums === String ? "None_ERRORCODEWS" : 0;
                object.errorMsg = "";
                if (options.bytes === String)
                    object.data = "";
                else {
                    object.data = [];
                    if (options.bytes !== Array)
                        object.data = $util.newBuffer(object.data);
                }
            }
            if (message.cmdOrder != null && message.hasOwnProperty("cmdOrder"))
                object.cmdOrder = message.cmdOrder;
            if (message.cmdIndex != null && message.hasOwnProperty("cmdIndex"))
                object.cmdIndex = message.cmdIndex;
            if (message.timeUpload != null && message.hasOwnProperty("timeUpload"))
                if (typeof message.timeUpload === "number")
                    object.timeUpload = options.longs === String ? String(message.timeUpload) : message.timeUpload;
                else
                    object.timeUpload = options.longs === String ? $util.Long.prototype.toString.call(message.timeUpload) : options.longs === Number ? new $util.LongBits(message.timeUpload.low >>> 0, message.timeUpload.high >>> 0).toNumber() : message.timeUpload;
            if (message.timeDownload != null && message.hasOwnProperty("timeDownload"))
                if (typeof message.timeDownload === "number")
                    object.timeDownload = options.longs === String ? String(message.timeDownload) : message.timeDownload;
                else
                    object.timeDownload = options.longs === String ? $util.Long.prototype.toString.call(message.timeDownload) : options.longs === Number ? new $util.LongBits(message.timeDownload.low >>> 0, message.timeDownload.high >>> 0).toNumber() : message.timeDownload;
            if (message.errorCode != null && message.hasOwnProperty("errorCode"))
                object.errorCode = options.enums === String ? $root.JhaoProto.ErrorCodeWs[message.errorCode] === undefined ? message.errorCode : $root.JhaoProto.ErrorCodeWs[message.errorCode] : message.errorCode;
            if (message.errorMsg != null && message.hasOwnProperty("errorMsg"))
                object.errorMsg = message.errorMsg;
            if (message.data != null && message.hasOwnProperty("data"))
                object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
            return object;
        };

        /**
         * Converts this BaseMsg to JSON.
         * @function toJSON
         * @memberof JhaoProto.BaseMsg
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        BaseMsg.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for BaseMsg
         * @function getTypeUrl
         * @memberof JhaoProto.BaseMsg
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        BaseMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/JhaoProto.BaseMsg";
        };

        return BaseMsg;
    })();

    /**
     * ErrorCodeWs enum.
     * @name JhaoProto.ErrorCodeWs
     * @enum {number}
     * @property {number} None_ERRORCODEWS=0 预设
     * @property {number} OK=200 成功
     */
    JhaoProto.ErrorCodeWs = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "None_ERRORCODEWS"] = 0;
        values[valuesById[200] = "OK"] = 200;
        return values;
    })();

    /**
     * CmdIndex enum.
     * @name JhaoProto.CmdIndex
     * @enum {number}
     * @property {number} NONE_CMDINDEX=0 预设
     * @property {number} BE_ML=1001 被别人双修监听
     * @property {number} SPECIAL_TASK=1002 触发特殊任务
     * @property {number} PLAY_TASK=1003 触发试玩任务
     * @property {number} NOTICE=1004 触发Notice null NoticeMsg
     * @property {number} NEW_NOTICE=1005 新的通知 null NewNoticMsg
     * @property {number} NOTICE_MSG=1006 公告通知 null ReceiveNotice
     * @property {number} LOGIN=1100 SendLoginData ReceiveLoginData   login登录
     * @property {number} CREATE_MONSTER=1101 怪物召唤SendCreateMonster ReceiveCreateMonster
     * @property {number} KICK=8888 被踢下线监听
     * @property {number} REQUEST_ALL_SERVER_REWARD=8889 请求全服奖励 null RoleVo
     * @property {number} HEART_BEAT=9999 心跳
     */
    JhaoProto.CmdIndex = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "NONE_CMDINDEX"] = 0;
        values[valuesById[1001] = "BE_ML"] = 1001;
        values[valuesById[1002] = "SPECIAL_TASK"] = 1002;
        values[valuesById[1003] = "PLAY_TASK"] = 1003;
        values[valuesById[1004] = "NOTICE"] = 1004;
        values[valuesById[1005] = "NEW_NOTICE"] = 1005;
        values[valuesById[1006] = "NOTICE_MSG"] = 1006;
        values[valuesById[1100] = "LOGIN"] = 1100;
        values[valuesById[1101] = "CREATE_MONSTER"] = 1101;
        values[valuesById[8888] = "KICK"] = 8888;
        values[valuesById[8889] = "REQUEST_ALL_SERVER_REWARD"] = 8889;
        values[valuesById[9999] = "HEART_BEAT"] = 9999;
        return values;
    })();

    JhaoProto.RespPing = (function() {

        /**
         * Properties of a RespPing.
         * @memberof JhaoProto
         * @interface IRespPing
         * @property {number|Long|null} [t] RespPing t
         * @property {boolean|null} [n] RespPing n
         */

        /**
         * Constructs a new RespPing.
         * @memberof JhaoProto
         * @classdesc Represents a RespPing.
         * @implements IRespPing
         * @constructor
         * @param {JhaoProto.IRespPing=} [properties] Properties to set
         */
        function RespPing(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * RespPing t.
         * @member {number|Long} t
         * @memberof JhaoProto.RespPing
         * @instance
         */
        RespPing.prototype.t = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * RespPing n.
         * @member {boolean} n
         * @memberof JhaoProto.RespPing
         * @instance
         */
        RespPing.prototype.n = false;

        /**
         * Creates a new RespPing instance using the specified properties.
         * @function create
         * @memberof JhaoProto.RespPing
         * @static
         * @param {JhaoProto.IRespPing=} [properties] Properties to set
         * @returns {JhaoProto.RespPing} RespPing instance
         */
        RespPing.create = function create(properties) {
            return new RespPing(properties);
        };

        /**
         * Encodes the specified RespPing message. Does not implicitly {@link JhaoProto.RespPing.verify|verify} messages.
         * @function encode
         * @memberof JhaoProto.RespPing
         * @static
         * @param {JhaoProto.IRespPing} message RespPing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        RespPing.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.t != null && Object.hasOwnProperty.call(message, "t"))
                writer.uint32(/* id 1, wireType 0 =*/8).int64(message.t);
            if (message.n != null && Object.hasOwnProperty.call(message, "n"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.n);
            return writer;
        };

        /**
         * Encodes the specified RespPing message, length delimited. Does not implicitly {@link JhaoProto.RespPing.verify|verify} messages.
         * @function encodeDelimited
         * @memberof JhaoProto.RespPing
         * @static
         * @param {JhaoProto.IRespPing} message RespPing message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        RespPing.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a RespPing message from the specified reader or buffer.
         * @function decode
         * @memberof JhaoProto.RespPing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {JhaoProto.RespPing} RespPing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        RespPing.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.JhaoProto.RespPing();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.t = reader.int64();
                        break;
                    }
                case 2: {
                        message.n = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a RespPing message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof JhaoProto.RespPing
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {JhaoProto.RespPing} RespPing
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        RespPing.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a RespPing message.
         * @function verify
         * @memberof JhaoProto.RespPing
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        RespPing.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.t != null && message.hasOwnProperty("t"))
                if (!$util.isInteger(message.t) && !(message.t && $util.isInteger(message.t.low) && $util.isInteger(message.t.high)))
                    return "t: integer|Long expected";
            if (message.n != null && message.hasOwnProperty("n"))
                if (typeof message.n !== "boolean")
                    return "n: boolean expected";
            return null;
        };

        /**
         * Creates a RespPing message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof JhaoProto.RespPing
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {JhaoProto.RespPing} RespPing
         */
        RespPing.fromObject = function fromObject(object) {
            if (object instanceof $root.JhaoProto.RespPing)
                return object;
            var message = new $root.JhaoProto.RespPing();
            if (object.t != null)
                if ($util.Long)
                    (message.t = $util.Long.fromValue(object.t)).unsigned = false;
                else if (typeof object.t === "string")
                    message.t = parseInt(object.t, 10);
                else if (typeof object.t === "number")
                    message.t = object.t;
                else if (typeof object.t === "object")
                    message.t = new $util.LongBits(object.t.low >>> 0, object.t.high >>> 0).toNumber();
            if (object.n != null)
                message.n = Boolean(object.n);
            return message;
        };

        /**
         * Creates a plain object from a RespPing message. Also converts values to other types if specified.
         * @function toObject
         * @memberof JhaoProto.RespPing
         * @static
         * @param {JhaoProto.RespPing} message RespPing
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        RespPing.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.t = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.t = options.longs === String ? "0" : 0;
                object.n = false;
            }
            if (message.t != null && message.hasOwnProperty("t"))
                if (typeof message.t === "number")
                    object.t = options.longs === String ? String(message.t) : message.t;
                else
                    object.t = options.longs === String ? $util.Long.prototype.toString.call(message.t) : options.longs === Number ? new $util.LongBits(message.t.low >>> 0, message.t.high >>> 0).toNumber() : message.t;
            if (message.n != null && message.hasOwnProperty("n"))
                object.n = message.n;
            return object;
        };

        /**
         * Converts this RespPing to JSON.
         * @function toJSON
         * @memberof JhaoProto.RespPing
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        RespPing.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for RespPing
         * @function getTypeUrl
         * @memberof JhaoProto.RespPing
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        RespPing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/JhaoProto.RespPing";
        };

        return RespPing;
    })();

    JhaoProto.ReqLogin = (function() {

        /**
         * Properties of a ReqLogin.
         * @memberof JhaoProto
         * @interface IReqLogin
         * @property {string|null} [account] ReqLogin account
         * @property {string|null} [token] ReqLogin token
         * @property {string|null} [nickname] ReqLogin nickname
         * @property {number|null} [sex] ReqLogin sex
         * @property {string|null} [headimgurl] ReqLogin headimgurl
         */

        /**
         * Constructs a new ReqLogin.
         * @memberof JhaoProto
         * @classdesc Represents a ReqLogin.
         * @implements IReqLogin
         * @constructor
         * @param {JhaoProto.IReqLogin=} [properties] Properties to set
         */
        function ReqLogin(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ReqLogin account.
         * @member {string} account
         * @memberof JhaoProto.ReqLogin
         * @instance
         */
        ReqLogin.prototype.account = "";

        /**
         * ReqLogin token.
         * @member {string} token
         * @memberof JhaoProto.ReqLogin
         * @instance
         */
        ReqLogin.prototype.token = "";

        /**
         * ReqLogin nickname.
         * @member {string} nickname
         * @memberof JhaoProto.ReqLogin
         * @instance
         */
        ReqLogin.prototype.nickname = "";

        /**
         * ReqLogin sex.
         * @member {number} sex
         * @memberof JhaoProto.ReqLogin
         * @instance
         */
        ReqLogin.prototype.sex = 0;

        /**
         * ReqLogin headimgurl.
         * @member {string} headimgurl
         * @memberof JhaoProto.ReqLogin
         * @instance
         */
        ReqLogin.prototype.headimgurl = "";

        /**
         * Creates a new ReqLogin instance using the specified properties.
         * @function create
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {JhaoProto.IReqLogin=} [properties] Properties to set
         * @returns {JhaoProto.ReqLogin} ReqLogin instance
         */
        ReqLogin.create = function create(properties) {
            return new ReqLogin(properties);
        };

        /**
         * Encodes the specified ReqLogin message. Does not implicitly {@link JhaoProto.ReqLogin.verify|verify} messages.
         * @function encode
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {JhaoProto.IReqLogin} message ReqLogin message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ReqLogin.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.account != null && Object.hasOwnProperty.call(message, "account"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.account);
            if (message.token != null && Object.hasOwnProperty.call(message, "token"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.token);
            if (message.nickname != null && Object.hasOwnProperty.call(message, "nickname"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.nickname);
            if (message.sex != null && Object.hasOwnProperty.call(message, "sex"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sex);
            if (message.headimgurl != null && Object.hasOwnProperty.call(message, "headimgurl"))
                writer.uint32(/* id 5, wireType 2 =*/42).string(message.headimgurl);
            return writer;
        };

        /**
         * Encodes the specified ReqLogin message, length delimited. Does not implicitly {@link JhaoProto.ReqLogin.verify|verify} messages.
         * @function encodeDelimited
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {JhaoProto.IReqLogin} message ReqLogin message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ReqLogin.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ReqLogin message from the specified reader or buffer.
         * @function decode
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {JhaoProto.ReqLogin} ReqLogin
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ReqLogin.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.JhaoProto.ReqLogin();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.account = reader.string();
                        break;
                    }
                case 2: {
                        message.token = reader.string();
                        break;
                    }
                case 3: {
                        message.nickname = reader.string();
                        break;
                    }
                case 4: {
                        message.sex = reader.int32();
                        break;
                    }
                case 5: {
                        message.headimgurl = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ReqLogin message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {JhaoProto.ReqLogin} ReqLogin
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ReqLogin.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ReqLogin message.
         * @function verify
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ReqLogin.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.account != null && message.hasOwnProperty("account"))
                if (!$util.isString(message.account))
                    return "account: string expected";
            if (message.token != null && message.hasOwnProperty("token"))
                if (!$util.isString(message.token))
                    return "token: string expected";
            if (message.nickname != null && message.hasOwnProperty("nickname"))
                if (!$util.isString(message.nickname))
                    return "nickname: string expected";
            if (message.sex != null && message.hasOwnProperty("sex"))
                if (!$util.isInteger(message.sex))
                    return "sex: integer expected";
            if (message.headimgurl != null && message.hasOwnProperty("headimgurl"))
                if (!$util.isString(message.headimgurl))
                    return "headimgurl: string expected";
            return null;
        };

        /**
         * Creates a ReqLogin message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {JhaoProto.ReqLogin} ReqLogin
         */
        ReqLogin.fromObject = function fromObject(object) {
            if (object instanceof $root.JhaoProto.ReqLogin)
                return object;
            var message = new $root.JhaoProto.ReqLogin();
            if (object.account != null)
                message.account = String(object.account);
            if (object.token != null)
                message.token = String(object.token);
            if (object.nickname != null)
                message.nickname = String(object.nickname);
            if (object.sex != null)
                message.sex = object.sex | 0;
            if (object.headimgurl != null)
                message.headimgurl = String(object.headimgurl);
            return message;
        };

        /**
         * Creates a plain object from a ReqLogin message. Also converts values to other types if specified.
         * @function toObject
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {JhaoProto.ReqLogin} message ReqLogin
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ReqLogin.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.account = "";
                object.token = "";
                object.nickname = "";
                object.sex = 0;
                object.headimgurl = "";
            }
            if (message.account != null && message.hasOwnProperty("account"))
                object.account = message.account;
            if (message.token != null && message.hasOwnProperty("token"))
                object.token = message.token;
            if (message.nickname != null && message.hasOwnProperty("nickname"))
                object.nickname = message.nickname;
            if (message.sex != null && message.hasOwnProperty("sex"))
                object.sex = message.sex;
            if (message.headimgurl != null && message.hasOwnProperty("headimgurl"))
                object.headimgurl = message.headimgurl;
            return object;
        };

        /**
         * Converts this ReqLogin to JSON.
         * @function toJSON
         * @memberof JhaoProto.ReqLogin
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ReqLogin.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ReqLogin
         * @function getTypeUrl
         * @memberof JhaoProto.ReqLogin
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ReqLogin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/JhaoProto.ReqLogin";
        };

        return ReqLogin;
    })();

    JhaoProto.RespLogin = (function() {

        /**
         * Properties of a RespLogin.
         * @memberof JhaoProto
         * @interface IRespLogin
         * @property {JhaoProto.IRoleVo|null} [role] RespLogin role
         */

        /**
         * Constructs a new RespLogin.
         * @memberof JhaoProto
         * @classdesc Represents a RespLogin.
         * @implements IRespLogin
         * @constructor
         * @param {JhaoProto.IRespLogin=} [properties] Properties to set
         */
        function RespLogin(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * RespLogin role.
         * @member {JhaoProto.IRoleVo|null|undefined} role
         * @memberof JhaoProto.RespLogin
         * @instance
         */
        RespLogin.prototype.role = null;

        /**
         * Creates a new RespLogin instance using the specified properties.
         * @function create
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {JhaoProto.IRespLogin=} [properties] Properties to set
         * @returns {JhaoProto.RespLogin} RespLogin instance
         */
        RespLogin.create = function create(properties) {
            return new RespLogin(properties);
        };

        /**
         * Encodes the specified RespLogin message. Does not implicitly {@link JhaoProto.RespLogin.verify|verify} messages.
         * @function encode
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {JhaoProto.IRespLogin} message RespLogin message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        RespLogin.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.role != null && Object.hasOwnProperty.call(message, "role"))
                $root.JhaoProto.RoleVo.encode(message.role, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified RespLogin message, length delimited. Does not implicitly {@link JhaoProto.RespLogin.verify|verify} messages.
         * @function encodeDelimited
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {JhaoProto.IRespLogin} message RespLogin message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        RespLogin.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a RespLogin message from the specified reader or buffer.
         * @function decode
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {JhaoProto.RespLogin} RespLogin
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        RespLogin.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.JhaoProto.RespLogin();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.role = $root.JhaoProto.RoleVo.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a RespLogin message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {JhaoProto.RespLogin} RespLogin
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        RespLogin.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a RespLogin message.
         * @function verify
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        RespLogin.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.role != null && message.hasOwnProperty("role")) {
                var error = $root.JhaoProto.RoleVo.verify(message.role);
                if (error)
                    return "role." + error;
            }
            return null;
        };

        /**
         * Creates a RespLogin message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {JhaoProto.RespLogin} RespLogin
         */
        RespLogin.fromObject = function fromObject(object) {
            if (object instanceof $root.JhaoProto.RespLogin)
                return object;
            var message = new $root.JhaoProto.RespLogin();
            if (object.role != null) {
                if (typeof object.role !== "object")
                    throw TypeError(".JhaoProto.RespLogin.role: object expected");
                message.role = $root.JhaoProto.RoleVo.fromObject(object.role);
            }
            return message;
        };

        /**
         * Creates a plain object from a RespLogin message. Also converts values to other types if specified.
         * @function toObject
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {JhaoProto.RespLogin} message RespLogin
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        RespLogin.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.role = null;
            if (message.role != null && message.hasOwnProperty("role"))
                object.role = $root.JhaoProto.RoleVo.toObject(message.role, options);
            return object;
        };

        /**
         * Converts this RespLogin to JSON.
         * @function toJSON
         * @memberof JhaoProto.RespLogin
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        RespLogin.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for RespLogin
         * @function getTypeUrl
         * @memberof JhaoProto.RespLogin
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        RespLogin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/JhaoProto.RespLogin";
        };

        return RespLogin;
    })();

    JhaoProto.RoleVo = (function() {

        /**
         * Properties of a RoleVo.
         * @memberof JhaoProto
         * @interface IRoleVo
         * @property {string|null} [openID] 开放平台openid
         * @property {JhaoProto.IUserInfo|null} [userInfo] 玩家userinfo
         */

        /**
         * Constructs a new RoleVo.
         * @memberof JhaoProto
         * @classdesc 需要频繁交互的用户数据
         * @implements IRoleVo
         * @constructor
         * @param {JhaoProto.IRoleVo=} [properties] Properties to set
         */
        function RoleVo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * 开放平台openid
         * @member {string} openID
         * @memberof JhaoProto.RoleVo
         * @instance
         */
        RoleVo.prototype.openID = "";

        /**
         * 玩家userinfo
         * @member {JhaoProto.IUserInfo|null|undefined} userInfo
         * @memberof JhaoProto.RoleVo
         * @instance
         */
        RoleVo.prototype.userInfo = null;

        /**
         * Creates a new RoleVo instance using the specified properties.
         * @function create
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {JhaoProto.IRoleVo=} [properties] Properties to set
         * @returns {JhaoProto.RoleVo} RoleVo instance
         */
        RoleVo.create = function create(properties) {
            return new RoleVo(properties);
        };

        /**
         * Encodes the specified RoleVo message. Does not implicitly {@link JhaoProto.RoleVo.verify|verify} messages.
         * @function encode
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {JhaoProto.IRoleVo} message RoleVo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        RoleVo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.openID != null && Object.hasOwnProperty.call(message, "openID"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.openID);
            if (message.userInfo != null && Object.hasOwnProperty.call(message, "userInfo"))
                $root.JhaoProto.UserInfo.encode(message.userInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified RoleVo message, length delimited. Does not implicitly {@link JhaoProto.RoleVo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {JhaoProto.IRoleVo} message RoleVo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        RoleVo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a RoleVo message from the specified reader or buffer.
         * @function decode
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {JhaoProto.RoleVo} RoleVo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        RoleVo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.JhaoProto.RoleVo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.openID = reader.string();
                        break;
                    }
                case 2: {
                        message.userInfo = $root.JhaoProto.UserInfo.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a RoleVo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {JhaoProto.RoleVo} RoleVo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        RoleVo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a RoleVo message.
         * @function verify
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        RoleVo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.openID != null && message.hasOwnProperty("openID"))
                if (!$util.isString(message.openID))
                    return "openID: string expected";
            if (message.userInfo != null && message.hasOwnProperty("userInfo")) {
                var error = $root.JhaoProto.UserInfo.verify(message.userInfo);
                if (error)
                    return "userInfo." + error;
            }
            return null;
        };

        /**
         * Creates a RoleVo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {JhaoProto.RoleVo} RoleVo
         */
        RoleVo.fromObject = function fromObject(object) {
            if (object instanceof $root.JhaoProto.RoleVo)
                return object;
            var message = new $root.JhaoProto.RoleVo();
            if (object.openID != null)
                message.openID = String(object.openID);
            if (object.userInfo != null) {
                if (typeof object.userInfo !== "object")
                    throw TypeError(".JhaoProto.RoleVo.userInfo: object expected");
                message.userInfo = $root.JhaoProto.UserInfo.fromObject(object.userInfo);
            }
            return message;
        };

        /**
         * Creates a plain object from a RoleVo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {JhaoProto.RoleVo} message RoleVo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        RoleVo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.openID = "";
                object.userInfo = null;
            }
            if (message.openID != null && message.hasOwnProperty("openID"))
                object.openID = message.openID;
            if (message.userInfo != null && message.hasOwnProperty("userInfo"))
                object.userInfo = $root.JhaoProto.UserInfo.toObject(message.userInfo, options);
            return object;
        };

        /**
         * Converts this RoleVo to JSON.
         * @function toJSON
         * @memberof JhaoProto.RoleVo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        RoleVo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for RoleVo
         * @function getTypeUrl
         * @memberof JhaoProto.RoleVo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        RoleVo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/JhaoProto.RoleVo";
        };

        return RoleVo;
    })();

    JhaoProto.UserInfo = (function() {

        /**
         * Properties of a UserInfo.
         * @memberof JhaoProto
         * @interface IUserInfo
         * @property {string|null} [userID] 服务器userid
         * @property {string|null} [userName] user name
         * @property {string|null} [userPhoto] user photo
         */

        /**
         * Constructs a new UserInfo.
         * @memberof JhaoProto
         * @classdesc 战斗力 = （血量 + 攻击 + 防御） + （血量）/（1-闪避概率）+ （攻击） X （1+暴击率）X 1.3
         * @implements IUserInfo
         * @constructor
         * @param {JhaoProto.IUserInfo=} [properties] Properties to set
         */
        function UserInfo(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * 服务器userid
         * @member {string} userID
         * @memberof JhaoProto.UserInfo
         * @instance
         */
        UserInfo.prototype.userID = "";

        /**
         * user name
         * @member {string} userName
         * @memberof JhaoProto.UserInfo
         * @instance
         */
        UserInfo.prototype.userName = "";

        /**
         * user photo
         * @member {string} userPhoto
         * @memberof JhaoProto.UserInfo
         * @instance
         */
        UserInfo.prototype.userPhoto = "";

        /**
         * Creates a new UserInfo instance using the specified properties.
         * @function create
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {JhaoProto.IUserInfo=} [properties] Properties to set
         * @returns {JhaoProto.UserInfo} UserInfo instance
         */
        UserInfo.create = function create(properties) {
            return new UserInfo(properties);
        };

        /**
         * Encodes the specified UserInfo message. Does not implicitly {@link JhaoProto.UserInfo.verify|verify} messages.
         * @function encode
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {JhaoProto.IUserInfo} message UserInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserInfo.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.userID != null && Object.hasOwnProperty.call(message, "userID"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.userID);
            if (message.userName != null && Object.hasOwnProperty.call(message, "userName"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.userName);
            if (message.userPhoto != null && Object.hasOwnProperty.call(message, "userPhoto"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.userPhoto);
            return writer;
        };

        /**
         * Encodes the specified UserInfo message, length delimited. Does not implicitly {@link JhaoProto.UserInfo.verify|verify} messages.
         * @function encodeDelimited
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {JhaoProto.IUserInfo} message UserInfo message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        UserInfo.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a UserInfo message from the specified reader or buffer.
         * @function decode
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {JhaoProto.UserInfo} UserInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserInfo.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.JhaoProto.UserInfo();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.userID = reader.string();
                        break;
                    }
                case 2: {
                        message.userName = reader.string();
                        break;
                    }
                case 3: {
                        message.userPhoto = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a UserInfo message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {JhaoProto.UserInfo} UserInfo
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        UserInfo.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a UserInfo message.
         * @function verify
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        UserInfo.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.userID != null && message.hasOwnProperty("userID"))
                if (!$util.isString(message.userID))
                    return "userID: string expected";
            if (message.userName != null && message.hasOwnProperty("userName"))
                if (!$util.isString(message.userName))
                    return "userName: string expected";
            if (message.userPhoto != null && message.hasOwnProperty("userPhoto"))
                if (!$util.isString(message.userPhoto))
                    return "userPhoto: string expected";
            return null;
        };

        /**
         * Creates a UserInfo message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {JhaoProto.UserInfo} UserInfo
         */
        UserInfo.fromObject = function fromObject(object) {
            if (object instanceof $root.JhaoProto.UserInfo)
                return object;
            var message = new $root.JhaoProto.UserInfo();
            if (object.userID != null)
                message.userID = String(object.userID);
            if (object.userName != null)
                message.userName = String(object.userName);
            if (object.userPhoto != null)
                message.userPhoto = String(object.userPhoto);
            return message;
        };

        /**
         * Creates a plain object from a UserInfo message. Also converts values to other types if specified.
         * @function toObject
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {JhaoProto.UserInfo} message UserInfo
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        UserInfo.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.userID = "";
                object.userName = "";
                object.userPhoto = "";
            }
            if (message.userID != null && message.hasOwnProperty("userID"))
                object.userID = message.userID;
            if (message.userName != null && message.hasOwnProperty("userName"))
                object.userName = message.userName;
            if (message.userPhoto != null && message.hasOwnProperty("userPhoto"))
                object.userPhoto = message.userPhoto;
            return object;
        };

        /**
         * Converts this UserInfo to JSON.
         * @function toJSON
         * @memberof JhaoProto.UserInfo
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        UserInfo.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for UserInfo
         * @function getTypeUrl
         * @memberof JhaoProto.UserInfo
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        UserInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/JhaoProto.UserInfo";
        };

        return UserInfo;
    })();

    return JhaoProto;
})();

module.exports = $root;
